package com.qf.springboot.vo;

import com.qf.springboot.utils.Constants;

import java.util.HashMap;

public class ReturnVo extends HashMap {
    public static ReturnVo ok() {
        ReturnVo returnVo = new ReturnVo();
        returnVo.put("code", Constants.SUCCESS_CODE);
        returnVo.put("msg", "fail");
        return returnVo;
    }

    public static ReturnVo fail(String msg) {
        ReturnVo returnVo = new ReturnVo();
        returnVo.put("code", Constants.FAIL_CODE);
        returnVo.put("msg", msg);
        return returnVo;
    }
}
